package com.gmu.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gmu.domain.vo.TblOrderVo;
import com.gmu.pojo.TblActivities;
import com.gmu.pojo.TblOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 核酸预约 Mapper 接口
 * </p>
 *
 * @author testjava
 * @since 2022-07-24
 */
public interface TblOrderMapper extends BaseMapper<TblOrder> {

    TblOrder checkIsReservation(@Param("userId") Integer userId,@Param("activitiesId") Integer activitiesId);

    List<TblOrder> getOrderList(@Param("userId") Integer userId,@Param("status") Integer status);

    List<TblOrder> getOrderOneList(@Param("userId") Integer userId,@Param("idNumber") Integer idNumber,@Param("status") Integer status);

    IPage<TblActivities> getReservationRecordList(Page<TblActivities> page, @Param("tblOrder") TblOrderVo tblOrder, @Param("beginTime") String beginTime, @Param("endTime") String endTime);

    int deleteReservationRecord(Integer[] ids);

    List<TblOrderVo> getOrderRecordList(@Param("tblOrder") TblOrderVo tblOrder,@Param("beginTime") String beginTime,@Param("endTime") String endTime);

    TblOrder searchOrderByUserIdAndActivitiesId(Integer userId, Integer activitiesId,String idNumber);

    Integer setOrderToTested(String idNumber,Integer activitiesId);
}
